package org.example.new_hbps_backend_reconstruction.controller.patient;

import lombok.RequiredArgsConstructor;
import org.example.new_hbps_backend_reconstruction.common.results.R;
import org.example.new_hbps_backend_reconstruction.dto.UserDTO;
import org.example.new_hbps_backend_reconstruction.service.CustomRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 丁利军
 * @date 2025年10月10日 15:39
 * @description 个人定义注册用户Controller层
 */

@RestController
@RequestMapping("/custom_register")
@RequiredArgsConstructor
@ConditionalOnProperty(name = "register.user", matchIfMissing = true)
public class CustomRegisterController {

    @Autowired
    private CustomRegisterService customRegisterService;



    @PostMapping("/user")
    public R registerUser(@RequestBody UserDTO userDto) {
        return customRegisterService.customRegisterUser(userDto);
    }


//    @PostMapping("/import_doctor")
//    public R importDoctor(@RequestExcel List<DoctorExcelVO> excelVOList,
//                          BindingResult bindingResult) {
//        return customRegisterService.importDoctor(excelVOList,bindingResult);
//    }


}

